home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1996 #14 / Monster Media No. 14 (April 1996) (Monster Media, Inc.).ISO / prog_bas / mdbguru.zip / DICTGLOB.BAS < prev    next >
BASIC Source File  |  1994-09-22  |  4KB  |  103 lines

  1. Option Explicit
  2.  
  3. ' MousePointer
  4. Global Const DEFAULT = 0        ' 0 - Default
  5. Global Const ARROW = 1          ' 1 - Arrow
  6. Global Const CROSSHAIR = 2      ' 2 - Cross
  7. Global Const IBEAM = 3          ' 3 - I-Beam
  8. Global Const ICON_POINTER = 4   ' 4 - Icon
  9. Global Const SIZE_POINTER = 5   ' 5 - Size
  10. Global Const SIZE_NE_SW = 6     ' 6 - Size NE SW
  11. Global Const SIZE_N_S = 7       ' 7 - Size N S
  12. Global Const SIZE_NW_SE = 8     ' 8 - Size NW SE
  13. Global Const SIZE_W_E = 9       ' 9 - Size W E
  14. Global Const UP_ARROW = 10      ' 10 - Up Arrow
  15. Global Const HOURGLASS = 11     ' 11 - Hourglass
  16. Global Const NO_DROP = 12       ' 12 - No drop
  17.  
  18.  
  19. ' Function Parameters
  20. ' MsgBox parameters
  21. Global Const MB_OK = 0                 ' OK button only
  22. Global Const MB_OKCANCEL = 1           ' OK and Cancel buttons
  23. Global Const MB_ABORTRETRYIGNORE = 2   ' Abort, Retry, and Ignore buttons
  24. Global Const MB_YESNOCANCEL = 3        ' Yes, No, and Cancel buttons
  25. Global Const MB_YESNO = 4              ' Yes and No buttons
  26. Global Const MB_RETRYCANCEL = 5        ' Retry and Cancel buttons
  27.  
  28. Global Const MB_ICONSTOP = 16          ' Critical message
  29. Global Const MB_ICONQUESTION = 32      ' Warning query
  30. Global Const MB_ICONEXCLAMATION = 48   ' Warning message
  31. Global Const MB_ICONINFORMATION = 64   ' Information message
  32.  
  33. Global Const MB_APPLMODAL = 0          ' Application Modal Message Box
  34. Global Const MB_DEFBUTTON1 = 0         ' First button is default
  35. Global Const MB_DEFBUTTON2 = 256       ' Second button is default
  36. Global Const MB_DEFBUTTON3 = 512       ' Third button is default
  37. Global Const MB_SYSTEMMODAL = 4096      'System Modal
  38.  
  39. ' MsgBox return values
  40. Global Const IDOK = 1                  ' OK button pressed
  41. Global Const IDCANCEL = 2              ' Cancel button pressed
  42. Global Const IDABORT = 3               ' Abort button pressed
  43. Global Const IDRETRY = 4               ' Retry button pressed
  44. Global Const IDIGNORE = 5              ' Ignore button pressed
  45. Global Const IDYES = 6                 ' Yes button pressed
  46. Global Const IDNO = 7                  ' No button pressed
  47.  
  48. Sub outlines (formname As Form)
  49.     Dim drkgray As Long, fullwhite As Long
  50.     Dim i As Integer
  51.     Dim ctop As Integer, cleft As Integer, cright As Integer, cbottom As Integer
  52.  
  53.     ' Outline a form's controls for 3D look unless control's TAG
  54.     ' property is set to "skip".
  55.  
  56.     Dim cName As Control
  57.     drkgray = RGB(128, 128, 128)
  58.     fullwhite = RGB(255, 255, 255)
  59.  
  60.     For i = 0 To (formname.Controls.Count - 1)
  61.     Set cName = formname.Controls(i)
  62.     If TypeOf cName Is Menu Then
  63.         'Debug.Print "menu item"
  64.     ElseIf (UCase(Left(cName.Tag, 2)) = "OL") Then
  65.         If cName.Visible Then
  66.         ctop = cName.Top - screen.TwipsPerPixelY
  67.         cleft = cName.Left - screen.TwipsPerPixelX
  68.         cright = cName.Left + cName.Width
  69.         cbottom = cName.Top + cName.Height
  70.         formname.Line (cleft, ctop)-(cright, ctop), drkgray
  71.         formname.Line (cleft, ctop)-(cleft, cbottom), drkgray
  72.         formname.Line (cleft, cbottom)-(cright, cbottom), fullwhite
  73.         formname.Line (cright, ctop)-(cright, cbottom), fullwhite
  74.         End If
  75.     End If
  76.     Next i
  77. End Sub
  78.  
  79. Sub PicOutlines (pic As Control, ctl As Control)
  80.     Dim drkgray As Long, fullwhite As Long
  81.     Dim ctop As Integer, cleft As Integer, cright As Integer, cbottom As Integer
  82.  
  83.     If Not pic.Visible Or UCase(ctl.Tag) = "SKIP" Then Exit Sub
  84.  
  85.     ' Outline a form's controls for 3D look unless control's TAG
  86.     ' property is set to "skip".
  87.  
  88.     Dim cName As Control
  89.     drkgray = RGB(128, 128, 128)
  90.     fullwhite = RGB(255, 255, 255)
  91.  
  92.     ctop = ctl.Top - screen.TwipsPerPixelY
  93.     cleft = ctl.Left - screen.TwipsPerPixelX
  94.     cright = ctl.Left + ctl.Width
  95.     cbottom = ctl.Top + ctl.Height
  96.     pic.Line (cleft, ctop)-(cright, ctop), drkgray
  97.     pic.Line (cleft, ctop)-(cleft, cbottom), drkgray
  98.     pic.Line (cleft, cbottom)-(cright, cbottom), fullwhite
  99.     pic.Line (cright, ctop)-(cright, cbottom), fullwhite
  100.  
  101. End Sub
  102.  
  103.